﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Facebook.Web;
using System.IO;

/// <summary>
/// This class inherits CanvasFBMLBasePage which inherits the default Page. All Lutefisk pages will inherit this will give them access to the CurrentMusician object. This will allow
/// them to get information about the current users page they are visiting.
/// </summary>
public partial class LutefiskPage : CanvasFBMLBasePage
{
    public LutefiskPage()
    {
        // Intialize CurrentMusician to prevent unintialization errors.
        CurrentMusician = new Musician("", "", "",false, "", false);
    }

    /// <summary>
    /// Grab your user ID by default. You can grab another users ID by setting CurrentMusician to a new value once the page is loaded.
    /// </summary>
    /// <param name="e"></param>
    protected override void OnLoad(EventArgs e)
    {
        string uid = Api.Users.GetInfo().uid.ToString();

        CurrentMusician = Musician.CreateMusician(uid);

        base.OnLoad(e);
    }

    /// <summary>
    /// Musician object that allows the programmer to get information about which musician's page is being viewed.
    /// </summary>
    public Musician CurrentMusician
    {
        get;
        set;
    }

}